#include<stdio.h>
int main()
{
	int day = 1;
	int time = 1;
	float sum = 1;
	float num = 1;
	scanf_s("%d %d", &day, &time);
	if (day <= 5)
	{
		sum = 20 * time;
		num = 0.045 * sum;
		printf("sum=%f\nnum=%f", sum, num);
	}
	else if (day > 5 && day <= 7)
	{
		sum = 60 * time;
		num = 0.045 * sum;
		printf("sum=%f\nnum=%f", sum, num);
	}
	return 0;
}